package com.p2p.front.dal.dao;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.p2p.base.dao.BaseMapper;
import com.p2p.front.dal.model.UserInfoAuth;

/**
 * @author ruiqi
 *
 */
public interface UserInfoAuthDao extends BaseMapper{

	//@Select("select USER_ID,AUTH_VALUE from p2p_user_info_auth where USER_ID=#{userId}  for update")
	public UserInfoAuth selectForUpdate(String userId);
	
	//@Select("select USER_ID,AUTH_VALUE from p2p_user_info_auth where USER_ID=#{userId}")
	public UserInfoAuth getUserAuth(String userId);
	
	@Update("replace p2p_user_info_auth(USER_ID,AUTH_VALUE) values(#{userId},#{authValue})")
	public void save(UserInfoAuth userInfoAuth);
	
	@Select("select USER_ID,AUTH_VALUE from p2p_user_info_auth where USER_ID=#{userId}")
	public UserInfoAuth query(String userId);
}
